//
//  StrategyInlandCollectionViewCell.m
//  ITrip
//
//  Created by dllo on 15/5/23.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "StrategyInlandCollectionViewCell.h"
#import <UIImageView+AFNetworking.h>
@implementation StrategyInlandCollectionViewCell

- (void)dealloc
{
    [self.name_zh_cn_label_Inland release];
    [self.name_en_label_Inland release];
    [self.countLabel_Inland release];
    [self.imageview_Inland release];
    [self.countView_Inland release];
    [super dealloc];
}

- (void)setStrategyModelInland:(StrategyInlandModel *)strategyModelInland
{
    self.name_zh_cn_label_Inland.text = strategyModelInland.name_zh_cn_Inland;
    self.name_en_label_Inland.text = strategyModelInland.name_en_Inland;
    NSString *str = @"旅行地";
    self.countLabel_Inland.text = [str stringByAppendingFormat:@"%ld", strategyModelInland.poi_count_Inland];
    [self.imageview_Inland setImageWithURL:[NSURL URLWithString:strategyModelInland.imageInland] placeholderImage:nil];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createMyView];
    }
    return self;
}

- (void)createMyView
{
    self.imageview_Inland = [[UIImageView alloc]init];
    [self.contentView addSubview:self.imageview_Inland];
    
    self.name_zh_cn_label_Inland = [[UILabel alloc]init];
    [self.contentView addSubview:self.name_zh_cn_label_Inland];
    
    self.name_en_label_Inland = [[UILabel alloc]init];
    [self.contentView addSubview:self.name_en_label_Inland];
    
    self.countView_Inland = [[UIView alloc]init];
    [self.contentView addSubview:self.countView_Inland];
    
    self.countLabel_Inland = [[UILabel alloc]init];
    [self.contentView addSubview:self.countLabel_Inland];
    
    [self.imageview_Inland release];
    [self.name_zh_cn_label_Inland release];
    [self.name_en_label_Inland release];
    [self.countView_Inland release];
    [self.countLabel_Inland release];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageview_Inland.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    self.imageview_Inland.backgroundColor = [UIColor colorWithRed:227/255.0 green:233/255.0 blue:240/255.0 alpha:1];
    
    self.name_zh_cn_label_Inland.frame = CGRectMake(5, 5, 120, 30);
    self.name_zh_cn_label_Inland.backgroundColor = [UIColor clearColor];
    self.name_zh_cn_label_Inland.textColor = [UIColor whiteColor];
    self.name_zh_cn_label_Inland.font = [UIFont boldSystemFontOfSize:20];
    
    self.name_en_label_Inland.frame = CGRectMake(5, 30, 120, 30);
    self.name_en_label_Inland.backgroundColor = [UIColor clearColor];
    self.name_en_label_Inland.font = [UIFont systemFontOfSize:15];
    self.name_en_label_Inland.textColor = [UIColor whiteColor];
    
    self.countView_Inland.frame = CGRectMake(30, 180, 90, 25);
    self.countView_Inland.backgroundColor = [UIColor blackColor];
    self.countView_Inland.alpha = 0.4;
    self.countView_Inland.layer.cornerRadius = 10;
    self.countView_Inland.layer.masksToBounds = YES;
    
    self.countLabel_Inland.frame = CGRectMake(30, 180, 90, 25);
    self.countLabel_Inland.font = [UIFont systemFontOfSize:13];
    self.countLabel_Inland.textAlignment = NSTextAlignmentCenter;
    self.countLabel_Inland.textColor = [UIColor whiteColor];
    self.countLabel_Inland.font = [UIFont boldSystemFontOfSize:14];
    
}



@end
